-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI deployment of Wst using Blockfrost #44
base: main
Are you sure you want to change the base?
Conversation
e01b4ca
to
88b78c6
Compare
let root = DirectoryScriptRoot txi target | ||
(tx, _) <- Env.withEnv $ Env.withOperator opEnv $ Env.withDirectoryFor root $ Env.withTransferFromOperator | ||
$ Env.balanceTxEnv_ | ||
$ BuildTx.mintProtocolParams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice 👍
The missing ToSchema instance can be added to |
320b7ec
to
796332c
Compare
@@ -131,6 +135,13 @@ insertBlacklistNode cred blacklistNodes = Utils.inBabbage @era $ do | |||
opPkh <- asks (fst . Env.bteOperator . Env.operatorEnv) | |||
addRequiredSignature opPkh | |||
|
|||
spendBlacklistOutput :: forall era env m. (MonadReader env m, Env.HasOperatorEnv era env, Env.HasTransferLogicEnv env, C.IsBabbageBasedEra era, C.HasScriptLanguageInEra C.PlutusScriptV3 era, MonadBuildTx era m) => C.TxIn -> m () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently unused in the endpoints. I only needed it to remove a duplicate blacklist node I accidentally pushed on preview. We could later cleanup the interface and add an endpoint if need be.
addConwayStakeCredentialCertificate credMinting | ||
addConwayStakeCredentialCertificate credSpending | ||
addConwayStakeCredentialCertificate credSeizeSpending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration step for transfer script was missing issuer spend (seize) stake script
@@ -216,7 +216,17 @@ seizeCredentialAssetsTx :: forall era env m. | |||
seizeCredentialAssetsTx sanctionedCred = do | |||
opPkh <- asks (fst . Env.bteOperator . Env.operatorEnv) | |||
directory <- Query.registryNodes @era | |||
seizeTxo <- head <$> Query.userProgrammableOutputs sanctionedCred | |||
let getTxOutValue (C.TxOut _a v _d _r) = v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just selects the UTxO with the largest non ada asset quantities ignoring the asset names.
To seize all utxos the endpoints must be repeatedly called until NoTokensToSeize
is returned.
@@ -130,7 +131,8 @@ queryBlacklistedNodes _ (SerialiseAddress addr) = do | |||
. P.fromBuiltin | |||
. blnKey | |||
. uDatum | |||
Env.withEnv $ Env.withTransfer transferLogic (fmap (fmap getHash) (Query.blacklistNodes @era)) | |||
nonHeadNodes (P.fromBuiltin . blnKey . uDatum -> hsh) = hsh /= "" | |||
Env.withEnv $ Env.withTransfer transferLogic (fmap getHash . filter nonHeadNodes <$> (Query.blacklistNodes @era)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Desezialization would fail in the case of the head node with an empty payment credential
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The generated code needs to be updated
No description provided.